/**
 * 
 */
var params={};
$(function() {
	adaptive();
	params={size:2,type:2,userName:$("#userSearch").val()};
	var form1=$("#form1").serializeObject();
	params= $.extend({}, params, form1);
	loadDataPageIetm("/ietm/ietm-logN", "srcoll-documentation", "lists",params);
});

function logSearch(){
	var userName=$("#userSearch").val();
	$('#lists').html("");
	$("#operation").val("");
	$("#startDate").val("");
	$("#endDate").val("");
	params={size:2,type:2,userName:userName};
	loadDataPageIetm("/ietm/ietm-logN", "srcoll-documentation", "lists",params);
}
//高级搜索提交
function submitForm(){
	var form1=$("#logform").serializeObject();
	$.get("/ietm/ietm-log", form1,function(result){
	    if (result.code == "403") {
            $.Zebra_Dialog('<div class="prompt"><div class="success-icon"></div><div class="success-title">没有权限</div></div>', {
                'title': '提示',
                'buttons': ['确定']
            });
        } else {
          $("body").html(result);
        }
	  });
}
//构建数据列表--用于分页查询
function dataKk(data, me) {
	data=data.rows;
	var result = '';
	var arrLen = data.length;
	if (arrLen > 0) {
		for (var i = 0; i < arrLen; i++) {
			result +='<li><div class="spare-new"><div class="spare-newl">用户：'+data[i].userName+'</div> '
					+'<div class="spare-newl">行为：'+data[i].operation+'</div></div>'
					+'<div class="spare-new"> <div class="spare-newl">日期时间：'+data[i].createDate+'</div>'
					+'<div class="spare-newl">结果：<span style="color:#63dd00">'+data[i].result+'</span></div></div></li>' ;
		}
	} else {
		me.lock();
		me.noData();
	}
	return result;
}
